<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>主</title>
<import type='css' file="css.main" />
<load href="__PUBLIC__/js/jquery-1.9.1.min.js" />
<import type='js' file="js.main" />
</head>

<body> 
<div class="jiumabg">
	<div class="jiuma">
    	<div class="jiumaclose">X</div>
		<div class="jiuma_from"><input type="hidden" name="ycid" /><input name='searkey' type="text" placeholder="输入某个码的标题" /><a id="searchsubmit">搜索</a></div>
		<div class="jiumalist">正在加载数据...</div>
	</div>
</div> 
<div class="main-frame">
	<div class="position">众筹 > 众筹列表</div>
	<div class="table-list">
	 <table width="100%" border="1" cellspacing="0" cellpadding="0" class="indextable">
		    <tr class="th-bg">
		      <th width="5%">ID</th>
		      <th width="16%">众筹名称</th>
		      <th width="16%">所属基金会</th>
		      <th width="12%">开始时间</th>
		      <th width="12%">结束时间</th>
		      <th width="9%">总金额</th>
		      <th width="12%">发布时间</th>
		      <th width="7%">众筹状态</th>
		      <th width="10%">操作</th>
	        </tr>
	        <volist name='result' id='data'>
		    <tr class="tr-line">
		      <td>{$data.id}</td>
		      <td style="text-align:left; padding-left:6px;" class="tbu">{$data.pro_name}</td>
		      <td style="text-align:left; padding-left:6px;" class="tbu">{:W('Menutype/pjjh',array($data['pid']))}</td>
		      <td>{$data.pro_starttime}</td>
		      <td>{$data.pro_endtime}</td>
		      <td>{$data.pro_summoney}</td>
		      <td>{$data.pro_pubtime}</td>
		      <td><a onclick="changestate('{:U('Zchou/changestate',array('id'=>$data['id'],'state'=>$data['pro_state']))}')"><if condition="$data.pro_state eq 1"><span class="topen">开启</span><else/><span class="tclose">关闭</span></if></a></td>
		      <td>
		      	<a href="{:U('editzchou',array('id'=>$data['id']))}">编辑</a> / 
		      	<a class="resdel" refurl="{:U('Zchou/delete',array('id'=>$data['id']))}">删除</a>
		      </td>
	        </tr>
	        </volist>
      </table>
    </div>
    <div class="page">{$page}</div>
</div>
<script type="text/javascript">
	$(function(){
		$("a.resdel").each(function(index, element) {
			var t = $(this);
			t.click(function(){
				var r=confirm("想好！确定要删除吗？");
				if (r==true){
					var refurl = $(this).attr('refurl');
					location.href = refurl;
				}else{
					return false;
				}
			})
		});
	})
</script>
</body>
</html>
